#!/usr/bin/env python3
# -*- coding:utf-8 -*-
import random
class caiquan():
    print('欢迎来到猜拳游戏')
    print('进入游戏--8')
    print('退出游戏--9')
    b = input("请输入：")
    while b == '8':
         print("请选择您的对手：1郭峰2张总正3小毛球")
         li=['郭峰','张总正','小毛球']
         sel = int(input("请重新选择："))
         diannao=li[sel-1]
         print('请进行猜拳：')
         print('石头--1')
         print('布--2')
         print('剪刀--3')
         li2=['石头','布','剪刀']
         a = random.randint(1,3)
         str1=li2[a-1]
         b = int(input("请输入你的选项："))  # 整型，
         print("你的选择是",li2[b-1])
         print(diannao,"选择的是",str1)
         if (a == 1 and b == 2) or(a == 2 and b == 3)or(a == 3and b == 1):
             print("你赢了！\n")
         elif a == b:
             print("平局！\n")
         else:
             print("你输了！\n")
    print('继续游戏--8')
    print('退出游戏--9')
    b = input("请重新选择：")
    print("你的选择是: ", b + "\n")


if __name__ == "__main__":
    caiquan()
    print('游戏结束！')
    pass